﻿@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>Index</title>
    <script src="~/lib/jquery/dist/jquery.min.js"></script>

    <script type="text/javascript">
        $(() => {

            var obj = {};

            $.ajax({
                url: "@Url.Action("AjaxRequest")",
                type: "get",
                async: false,
                success:function(m){   //回调
                    console.log("ajax:",m);
                    obj = m;
                }
            });

            console.log("外部",obj);
        });
    </script>
</head>
<body>
    <img src="~/pic/pic.jpg" />
</body>
</html>
